package org.jeecg.modules.demo.task.manager;

import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.jeecg.modules.demo.task.entity.TTask;
import org.jeecg.modules.demo.task.taskImpl.FindTaskContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @ClassName: MyJobRunner
 * @Description:
 * @Author: 墨渍
 * @Date: 2025/4/17 9:46
 **/
@Component
@Slf4j
public class MyComTaskRunner {

    @Resource
    FindTaskContext findTaskContext;

    public void execute(TTask job) {
        log.info("执行任务 [{}]，参数：{}", job.getId(), job.getNoteId());
        // 这里是你实际的业务逻辑
        findTaskContext.findComment(job.getNoteId(),job.getToken(), job.getUserId());
        log.info("任务 [{}] 执行完毕", job.getId());
    }
}
